import logging
import os

from src.core.utils.date import get_date_time


def configure_logging() -> None:
    logging.getLogger("aiohttp.access").setLevel(logging.WARNING)
    logging.getLogger("arq.worker").setLevel(logging.WARNING)

    logging.basicConfig(
        filename="{0}/logs/log-{1}.log".format(
            os.getcwd(), get_date_time(time_format="%Y-%m-%d", as_string=True)
        ),
        level=logging.INFO,
        format="%(filename)s:%(lineno)d #%(levelname)-8s [%(asctime)s] - %(name)s - %(message)s",
    )
